/*
 * @Author: Quinn
 * @Date: 2023-05-13 14:36:43
 * @LastEditors: 叽歪小Q
 * @Description:
 */

let menus = [
    {
        path: '/home',
        name: 'Home',
        meta: {title: '首页', icon: 'el-icon-s-home', authorityList: 1},
        component: () => import('@/views/System/home.vue'),
    },
    {
        path: '/dataContact',
        name: 'dataContact',
        meta: {title: '数据汇总', icon: 'el-icon-s-data', authorityList: 100},
        component: () => import('@/views/Pages/dataContact.vue'),
    },
    {
        path: '/order',
        meta: {title: '订单', icon: 'el-icon-suitcase', authorityList: 200},
        children: [
            {
                path: '/materialList',
                name: 'materialList',
                meta: {title: '材料订单列表', authorityList: 230},
                component: () => import('@/views/Pages/materialList.vue'),
            },
            {
                path: '/order',
                name: 'order',
                meta: {
                    title: '货架订单列表',
                    icon: 'el-icon-suitcase',
                    authorityList: 201
                },
                component: () => import('@/views/Pages/testOrder.vue'),
            },
            {
                path: '/collectList',
                name: 'collectList',
                meta: {title: '回款列表', icon: 'el-icon-suitcase', authorityList: 240},
                component: () => import('@/views/Pages/collectList.vue'),
            },
        ],
    },
    {
        path: '/OrderWarehouseTest',
        name: 'OrderWarehouseTest',
        meta: {title: '仓库订单列表', icon: 'el-icon-s-shop', authorityList: 300},
        component: () => import('@/views/Pages/OrderWarehouseTest.vue'),
    },
    // {
    //     path: '/sendTextPages',
    //     name: 'sendTextPages',
    //     meta: {title: '测试websocket', icon: 'el-icon-s-shop', authorityList: 300},
    //     component: () => import('@/views/Pages/sendTextPages.vue'),
    // },
    {
        path: '/warehouseCamera',
        name: 'warehouseCamera',
        meta: {title: '仓库摄像头列表', icon: 'el-icon-s-shop', authorityList: 400},
        component: () => import('@/views/Pages/warehouseCamera.vue'),
    },
    // {
    //     path: '/OrderWarehouse',
    //     name: 'OrderWarehouse',
    //     meta: {title: '仓库订单列表', icon: 'el-icon-s-shop', authority: 298},
    //     component: () => import('@/views/Pages/OrderWarehouse.vue'),
    // },
    {
        path: '/multipleList',
        name: 'multipleList',
        meta: {title: '增加单列表', icon: 'el-icon-s-shop', authorityList: 500},
        component: () => import('@/views/Pages/multipleOrder.vue'),
    }, {
        path: '/ddb',
        name: 'ddb',
        meta: {title: '洞洞板订单列表', icon: 'el-icon-s-shop', authorityList: 1400},
        component: () => import('@/views/Pages/ddb.vue'),
    },
    {
        path: '/OrderAftersale',
        name: 'OrderAftersale',
        meta: {title: '售后列表', icon: 'el-icon-s-marketing', authorityList: 600},
        component: () => import('@/views/Pages/OrderAftersale.vue'),
    },
    // {
    //     path: '/FactoryInventory',
    //     name: 'FactoryInventory',
    //     meta: {title: '工厂库存', icon: 'el-icon-s-goods', authorityList: 800},
    //     // meta: { title: "工厂库存", icon: "el-icon-s-goods", authority: 300 },
    //     component: () => import('@/views/Pages/FactoryInventory.vue'),
    // },
    {
        path: '/purchase',
        meta: {title: '采购', icon: 'el-icon-s-goods', authorityList: 700},
        children: [
            {
                path: '/purchaseList',
                name: 'PurchaseList',
                meta: {title: '采购单列表', authorityList: 701},
                component: () => import('@/views/Pages/purchaseList.vue'),
            },
            {
                path: '/isPerSale',
                name: 'IsPerSale',
                meta: {title: '预售单库存', authorityList: 710},
                component: () => import('@/views/Pages/isPerSale.vue'),
            },
            {
                path: '/deliveryNote',
                name: 'deliveryNote',
                meta: {title: '发货单', authorityList: 720},
                component: () => import('@/views/Pages/deliveryNote.vue'),
            },
        ], // meta: { title: "采购单列表", icon: "el-icon-s-goods", authority: 315 },
    },
    {
        path: '/outportSingle',
        name: 'outportSingle',
        meta: {title: '单品出库', icon: 'el-icon-s-marketing', authorityList: 800},
        component: () => import('@/views/Pages/OutportSingle.vue'),
    },
    {
        path: '/financeCharts',
        name: 'financeCharts',
        meta: {title: '财务报表', icon: 'el-icon-s-marketing', authorityList: 900},
        component: () => import('@/views/Pages/financeCharts.vue'),
    },
    // {
    //     path: '/damageList',
    //     name: 'damageList',
    //     meta: {
    //         title: '损坏列表',
    //         icon: 'el-icon-document-delete',
    //         authority: 994,
    //     },
    //     component: () => import('@/views/Pages/damageList.vue'),
    // },
    // {
    //     path: '/AdjustGoods',
    //     name: 'AdjustGoods',
    //     meta: {title: '调货列表', icon: 'el-icon-s-order', authority: 305},
    //     component: () => import('@/views/Pages/AdjustGoods.vue'),
    // },
    // {
    //     path: '/checkList',
    //     name: 'CheckList',
    //     meta: {title: '盘点列表', icon: 'el-icon-s-order', authority: 306},
    //     component: () => import('@/views/Pages/checkList.vue'),
    // },
    // {
    // 	path: "/OrderInstall",
    // 	name: "OrderInstall",
    // 	meta: { title: "安装列表", icon: "el-icon-s-shop" },
    // 	component: () => import("@/views/Pages/OrderInstall.vue"),
    // },
    // {
    // 	path: "/OrderFlow",
    // 	name: "OrderFlow",
    // 	meta: { title: "变更记录", icon: "el-icon-s-operation" },
    // 	component: () => import("@/views/Pages/OrderFlow.vue"),
    // },

    {
        path: '/finance',
        meta: {title: '财务管理', icon: 'el-icon-s-finance', authorityList: 1000},
        children: [
            {
                path: '/StoreLedger',
                name: 'StoreLedger',
                meta: {title: '仓库方管理运营数据', authorityList: 1001},
                component: () => import('@/views/Pages/finance/StoreLedger.vue'),
            },
            {
                path: '/AreaLedger',
                name: 'AreaLedger',
                meta: {title: '仓库费用数据', authorityList: 1020},
                component: () => import('@/views/Pages/finance/AreaLedger.vue'),
            },
            {
                path: '/reimbursementPeople',
                name: 'reimbursementPeople',
                meta: {title: '报销明细(人)/新', authorityList: 1030},
                component: () =>
                    import('@/views/Pages/finance/reimbursementPeople.vue'),
            },
            {
                path: '/reimbursementStore',
                name: 'reimbursementStore',
                meta: {title: '报销明细(店)/新', authorityList: 1040},
                component: () => import('@/views/Pages/finance/reimbursementStore.vue'),
            },
            {
                path: '/reimbursementConfiguration',
                name: 'reimbursementConfiguration',
                meta: {title: '报销配置/新', authorityList: 1050},
                component: () =>
                    import('@/views/Pages/finance/reimbursementConfiguration.vue'),
            },
        ],
    },
    {
        path: '/report',
        // meta: { title: "报表管理", icon: "el-icon-receiving", authority: 988 },
        meta: {title: '报表管理', icon: 'el-icon-receiving', authorityList: 1100},
        children: [
            {
                path: '/ReportOldList',
                name: 'ReportOldList',
                meta: {title: '总提成列表', authorityList: 1101},
                component: () => import('@/views/Pages/report/ReportOldList.vue'),
            },
            {
                path: '/materialFee',
                name: 'materialFee',
                meta: {title: '材料提成', authorityList: 1120},
                component: () => import('@/views/Pages/report/materialFee.vue'),
            },
            {
                path: '/ReportList',
                name: 'ReportList',
                meta: {title: '总提成列表/新', authorityList: 1130},
                component: () => import('@/views/Pages/report/ReportList.vue'),
            },
            {
                path: '/commissionConfiguration',
                name: 'commissionConfiguration',
                meta: {title: '提成逻辑配置/新', authorityList: 1140},
                component: () =>
                    import('@/views/Pages/report/commissionConfiguration.vue'),
            },
            // {
            //   path: "/trunkFee",
            //   name: "trunkFee",
            //   meta: { title: "货车装卸提成", authority: 985},
            //   component: () => import("@/views/Pages/report/trunkFee.vue"),
            // },
        ],
    },
    {
        path: '/inventory',
        meta: {title: '库存管理', icon: 'el-icon-s-data', authorityList: 1200},
        children: [
            {
                path: '/markList',
                name: 'markList',
                meta: {title: '标签列表', authorityList: 1201},
                component: () => import('@/views/Pages/markList.vue'),
            },
            {
                path: '/skuMark',
                name: 'skuMark',
                meta: {title: 'SKU列表', authorityList: 1210},
                component: () => import('@/views/Pages/skuMark.vue'),
            },
            {
                path: '/equipmentRecord',
                name: 'equipmentRecord',
                meta: {title: '设备出入库列表', authorityList: 1220},
                component: () => import('@/views/Pages/equipmentRecord.vue'),
            },
            {
                path: '/ClassifyManage',
                name: 'ClassifyManage',
                meta: {title: '套件管理', authorityList: 1230},
                component: () => import('@/views/Pages/ClassifyManage.vue'),
            },
            {
                path: '/ProductManage',
                name: 'ProductManage',
                meta: {title: '产品管理', authorityList: 1270},
                component: () => import('@/views/Pages/ProductManage.vue'),
            },
            {
                path: '/InventoryWarn',
                name: 'InventoryWarn',
                meta: {title: '库存警告', authorityList: 1240},
                component: () => import('@/views/Pages/InventoryWarn.vue'),
            },
            {
                path: '/InventoryDetail',
                name: 'InventoryDetail',
                meta: {title: '库存明细', authorityList: 1250},
                component: () => import('@/views/Pages/InventoryDetail.vue'),
            },
            {
                path: '/mobileList',
                name: 'mobileList',
                meta: {title: '库存预警'},
                component: () => import('@/views/Pages/MobileList.vue'),
            },
            // {
            //   path: "/InventoryChange",
            //   name: "InventoryChange",
            //   meta: { title: "库存变更",icon:'el-icon-s-data'},
            //   component: () => import("@/views/Pages/InventoryChange.vue"),
            // },
            {
                path: '/InventoryRecord',
                name: 'InventoryRecord',
                meta: {title: '出入库记录', authorityList: 1260},
                component: () => import('@/views/Pages/InventoryRecord.vue'),
            },
        ],
    },
    {
        path: '/team',
        meta: {
            title: '团队管理',
            icon: 'el-icon-user-solid',
            authorityList: 1300,
        },
        children: [
            {
                path: '/AccountManage',
                name: 'AccountManage',
                meta: {title: '人员管理', authorityList: 1301,},
                component: () => import('@/views/Pages/AccountManage.vue'),
            },
            {
                path: '/roleList',
                name: 'roleList',
                meta: {title: '角色管理', authorityList: 1310,},
                component: () => import('@/views/Pages/roleList.vue'),
            },
        ],
    },
]

const routes = []
menus.forEach((menu) => {
    if (menu.children) {
        menu.children.forEach((item) => routes.push(item))
    } else routes.push(menu)
})

export const menuRoutes = routes

export default menus
